[WebSocket] clientSocket
???/charger/client-socket
ClientSocketRequestDTO
Attributes:
Name | Type | Description |
---|---|---|
action |
ActionEnum
|
|
body |
Union[RemoteStartRequestDTO, RemoteStopRequestDTO, ChargingDetailsRequestDTO]
|
|
authorization |
str
|
JWT authorization token |
ClientSocketResponseDTO
Attributes:
Name | Type | Description |
---|---|---|
action |
ActionEnum
|
|
body |
Union[RemoteResponseDTO, ChargingDetailsResponseDTO]
|
|
ActionEnum
Values |
---|
Start |
Stop |
GetChargingDetails |
Remote Start Charging Action
RemoteStartRequestDTO
Attributes:
Name | Type | Description |
---|---|---|
site_id |
int
|
|
charger_id |
str
|
|
connector_id |
int
|
|
duration |
float
|
IN HOURS |
payment_intent_id |
Optional[str]
|
USE THIS FOR PAYMONGO. OTHERWISE, MONEY WILL BE DEDUCTED TO WALLET |
RemoteResponseDTO
Attributes:
Name | Type | Description |
---|---|---|
status |
CallResultStatusEnum
|
|
transaction_id |
str
|
|
Remote Stop Charging Action
RemoteStopRequestDTO
Attributes:
Name | Type | Description |
---|---|---|
transaction_id |
str
|
|
RemoteResponseDTO
Attributes:
Name | Type | Description |
---|---|---|
status |
CallResultStatusEnum
|
|
transaction_id |
str
|
|
Charging Details Action
ChargingDetailsRequestDTO
Attributes:
Name | Type | Description |
---|---|---|
transaction_id |
str
|
Transaction ID of the ongoing charging session |
site_id |
str
|
Site ID of the transaction |
ChargingDetailsResponseDTO
Attributes:
Name | Type | Description |
---|---|---|
duration |
str
|
Duration of the charging session in HH:MM:SS format |
kwh |
float
|
Total energy consumed in kWh |
latest_kw |
float
|
Latest power drawn by the vehicle in kW |
time_started |
str
|
Time when the charging session started in YYYY-MM-DD HH:MM:SS format |
time_remaining |
str
|
Time remaining for the charging session to complete in HH:MM:SS format |
total |
float
|
Total cost of the charging session in PHP |
cost_breakdown |
dict
|
Breakdown of the cost of the charging session |
soc |
float
|
State of charge of the vehicle in percentage (optional) |
Error Response
WSErrorResponseDTO
Attributes:
Name | Type | Description |
---|---|---|
action |
ActionEnum
|
action to be performed by the server |
error_message |
str
|
error message given in FE - BE code format (i.e. TXN_DONE) |
Notes
- There are only two types of errors that could possibly occur.
- The first type of error is when the error does not disconnect the WebSocket connection.
There are caused by the following:
TRANSACTION_DOES_NOT_EXIST
CHARGER_OFFLINE
- The second type of error will close the WebSocket connection and is caused by the following:
TXN_DONE
- The first type of error is when the error does not disconnect the WebSocket connection.
There are caused by the following: